﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using PeopleSource.Utl;

namespace PeopleSource.Entities
{
    #region 角色引用表
    public class Role : EntityBase
    {
        public const int LVL_SuperManager = 800;
        public const int LVL_Director = 1000;
        public const int LVL_Manager = 500;
        public const int LVL_TeamLeader = 100;
        public const int LVL_Sales = 10;
        public const int LVL_ImportingInterface = 6;
        public const int LVL_ProductInterface = 5;
        public const int LVL_FinancialInterface = 4;
        public const int LVL_ConferenceInterface = 3;
        public const int LVL_PoliticsInterface = 2;
        public const int LVL_MarketInterface = 1;


        [Display(Name = "职级名称"), Required]
        public String Name { get; set; }

        [Display(Name = "职级分数"), Required]
        public int Level { get; set; }
    }

    public class EmployeeRole : EntityBase
    {
        public virtual Role Role { get; set; }
        public int? RoleID { get; set; }

        [Display(Name = "英文名")]
        public string AccountName { get; set; }

        [Display(Name = "部门")]
        public int? DepartmentID { get; set; }
        public virtual Department Department { get; set; }

        [Display(Name = "工作职级")]
        public int? ExpLevelID { get; set; }
        public virtual ExpLevel ExpLevel { get; set; }

        [Display(Name = "入职时间")]
        public DateTime? StartDate { get; set; }

        [DataType(DataType.EmailAddress)]
        [Display(Name = "邮件地址")]
        public string Email { get; set; }

        [Display(Name = "中文名"), Required]
        public string AccountNameCN { get; set; }

        [Display(Name = "座机")]
        public int? AgentNum { get; set; }

        [Display(Name = "是否实习")]
        public bool? IsTrainee { get; set; }

        [Display(Name = "是否激活")]
        public bool IsActivated { get; set; }

        [DataType(DataType.PhoneNumber)]
        [Display(Name = "移动电话")]
        public string Mobile { get; set; }

        [Display(Name = "生日")]
        public DateTime? BirthDay { get; set; }

        [Display(Name = "员工性别")]
        public string Gender { get; set; }

        [Display(Name = "邮件签名")]
        public string EmailSignatures { get; set; }

        [Display(Name = "邮箱密码")]
        public string EmailPassword { get; set; }


    }

    public class Department : EntityBase
    {
        [Display(Name = "部门名称"), Required]
        public String Name { get; set; }
    }

    public class ExpLevel : EntityBase
    {
        [Display(Name = "级别"), Required]
        public String Name { get; set; }

        [Display(Name = "部门")]
        public virtual Department Department { get; set; }

        [Display(Name = "部门")]
        public int? DepartmentID { get; set; }
    }
    #endregion


 
   
}